/******************************************************************************
* File description: MaintenanceJiaReKuai2QuXian.qml
* Function: 维护-加热块：升降温曲线校准
* Current Version: 1.0.0
* Author: 张宇轩
* Date: 2024-08-29
*  -----
*  Copyright by 博坤生物 .
 *****************************************************************************/
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14

Item {
    id: root

    /* property 定义开始 */

    /* property 定义结束 */

    ColumnLayout {
        id: containerLayout
        anchors.fill: parent
        spacing: 16

        // 上半部分
        Item {
            id: topPart
            Layout.fillWidth: true
            Layout.fillHeight: true

            ColumnLayout {
                id: topPartLayout
                anchors.fill: parent

                // 按钮
                Item {
                    id: topPartBtnsContainer
                    Layout.fillWidth: true
                    Layout.preferredHeight: 40
                    Layout.rightMargin: 16

                    RowLayout {
                        id: topPartBtnsLayout
                        anchors.fill: parent
                        spacing: 8

                        CustomHorSpacerItem {}

                        // 读取
                        PureButton {
                            id: readOutBtn
                            Layout.preferredWidth: 120
                            Layout.preferredHeight: 40
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "读取"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }

                        // 写入
                        PureButton {
                            id: writeInBtn
                            Layout.preferredWidth: 120
                            Layout.preferredHeight: 40
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "写入"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }
                    }
                }

                // 表格
                MaintenanceJiaReKuai2QuXianTable {
                    id: shengJiangWenTable
                    Layout.fillWidth: true
                    Layout.fillHeight: true
                }
            }
        }

        // 分割线
        Rectangle {
            Layout.fillWidth: true
            Layout.preferredHeight: 2
            color: "#FFE6E6E6"
            border.width: 0
        }

        // 下半部分
        Item {
            id: bottomPart
            Layout.fillWidth: true
            Layout.preferredHeight: bottomPartLayout.implicitHeight
            Layout.leftMargin: 16
            Layout.rightMargin: 16

            ColumnLayout {
                id: bottomPartLayout
                width: parent.width
                height: implicitHeight
                spacing: 16

                // 升降温
                Item {
                    id: upDownTempCon
                    Layout.fillWidth: true
                    Layout.preferredHeight: 40

                    RowLayout {
                        width: parent.width
                        height: 40
                        spacing: 8

                        // 升温
                        LabelTextInput {
                            id: shengWenInput
                            Layout.fillWidth: true
                            Layout.fillHeight: true
                            inputWidth: width
                            inputHeight: height
                            placeholderText: ""
                            labelText: "升温(℃)"
                        }

                        PureButton {
                            id: shengWenBtn
                            Layout.preferredWidth: 80
                            Layout.preferredHeight: 40
                            pureBtnWidth: 80
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "升温"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }

                        // 降温
                        LabelTextInput {
                            id: jiangWenInput
                            Layout.fillWidth: true
                            Layout.fillHeight: true
                            inputWidth: width
                            inputHeight: height
                            placeholderText: ""
                            labelText: "降温(℃)"
                        }

                        PureButton {
                            id: jiangWenBtn
                            Layout.preferredWidth: 80
                            Layout.preferredHeight: 40
                            pureBtnWidth: 80
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "降温"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }

                        // 停止测试
                        PureButton {
                            id: stopUpDownTemp
                            Layout.preferredWidth: 120
                            Layout.preferredHeight: 40
                            isEnable: false
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "停止测试"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }

                    }
                }

                // 制冷热
                Item {
                    id: heatCoolCon
                    Layout.fillWidth: true
                    Layout.preferredHeight: 40

                    RowLayout {
                        width: parent.width
                        height: 40
                        spacing: 8

                        // 加热
                        LabelTextInput {
                            id: heatUpInput
                            Layout.fillWidth: true
                            Layout.fillHeight: true
                            inputWidth: width
                            inputHeight: height
                            placeholderText: ""
                            labelText: "升温(℃)"
                        }

                        PureButton {
                            id: heatUpBtn
                            Layout.preferredWidth: 80
                            Layout.preferredHeight: 40
                            pureBtnWidth: 80
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "加热"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }

                        // 制冷
                        LabelTextInput {
                            id: coolDownInput
                            Layout.fillWidth: true
                            Layout.fillHeight: true
                            inputWidth: width
                            inputHeight: height
                            placeholderText: ""
                            labelText: "降温(℃)"
                        }

                        PureButton {
                            id: coolDownBtn
                            Layout.preferredWidth: 80
                            Layout.preferredHeight: 40
                            pureBtnWidth: 80
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "制冷"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }

                        // 停止测试
                        PureButton {
                            id: stopHeatCool
                            Layout.preferredWidth: 120
                            Layout.preferredHeight: 40
                            isEnable: false
                            pureBtnColor: "#FF2F42CD"
                            pureHoveredColor: "#FF2F42CD"
                            pureLabelColor: "#FFFFFFFF"
                            pureFontHoveredColor: "#FFFFFFFF"
                            pureBtnBorderColor: "transparent"
                            pureText: "停止测试"
                            disabledPureBtnColor: "#FFF5F5F5"
                            disabledPureBtnBorderColor: "#FFD9D9D9"
                            disabledPureLabelColor: "#FFBFBFBF"
                            // 关闭过渡效果
                            isTransition: false
                        }
                    }
                }
            }
        }
    }
}
